package com.ynu.springbootappdemo.dao;

import com.ynu.springbootappdemo.model.entity.DeliveryAddress;
import com.ynu.springbootappdemo.model.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IDeliveryAddressDao extends JpaRepository<DeliveryAddress,Long> {
    List<DeliveryAddress> findAllByCustomer(User customer);

    DeliveryAddress findDeliveryAddressByCustomerAndId(User customer,Long id);


}
